package ua.net.gm.server.walker;

import java.util.Objects;

/**
 *
 * @author Yason
 */
public class WalkerMoveRank implements Comparable<WalkerMoveRank>
{
    private final Integer rank;

    public WalkerMoveRank(Integer rank)
    {
        this.rank = rank;
    }

    public int getRank()
    {
        return rank;
    }

    @Override
    public int hashCode()
    {
        int hash = 3;
        hash = 29 * hash + Objects.hashCode(this.rank);
        return hash;
    }

    @Override
    public boolean equals(Object obj)
    {
        if (obj == null)
        {
            return false;
        }
        if (getClass() != obj.getClass())
        {
            return false;
        }
        final WalkerMoveRank other = (WalkerMoveRank) obj;
        return Objects.equals(this.rank, other.rank);
    }

    @Override
    public int compareTo(WalkerMoveRank o)
    {
        return rank.compareTo(o.rank);
    }
}